package com.itheima.day02.jiekou;

import java.util.ArrayList;


public class ClassManage {
    private ArrayList<STUDENT> classes = new ArrayList<STUDENT>();
    private A a = new CM1();
    private A a1 = new CM2();
    public ClassManage() {
        STUDENT s1 = new STUDENT("mfc","nv",90);
        STUDENT s2 = new STUDENT("mfz","nan",87);
        STUDENT s3 = new STUDENT("mf","nan",99);
        STUDENT s4 = new STUDENT("mfr","nv",91);
        classes.add(s1);
        classes.add(s2);
        classes.add(s3);
        classes.add(s4);
    }
    public void printinfo() {
        a.printallinfo(classes);
        a1.printallinfo(classes);
    }
    public void printave() {
        a.printaverage(classes);
        a1.printaverage(classes);
    }
}
